
<template>
  <div id="cesiumContainer"></div>
</template>
<script setup lang="ts">
import * as Cesium from "cesium/Cesium"
import { onMounted } from 'vue';

const initCesium = () => {
  // 初始化 Cesium Viewer
  // Cesium.Ion.defaultAccessToken =
  //   'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI5NWFkZmYzMS0xMDYyLTRjZDctYmEyZi1kNzE5ZjcwMTU1MzAiLCJpZCI6MjU2MTE3LCJpYXQiOjE3MzE5MjY2NDR9.g-8ur3MEon9EqmR4PajLsxlFxMp_mPtF-OsRdllKSGs'
    const viewer = new Cesium.Viewer('cesiumContainer', {
    //这里是配置项
  })

  // // 你可以在这里添加更多的 Cesium 代码
  const entity = viewer.entities.add({
    name: 'Sample Point',
    position: Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
    point: {
      pixelSize: 10,
      color: Cesium.Color.RED,
    },
  })

  viewer.zoomTo(entity)
}
onMounted(() => {
  initCesium()
})
// initCesium()
</script>


<style scoped>
#cesiumContainer {
  width: 100%;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
</style>
